package org.jeecg.modules.userReports.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.userReports.entity.UserReportsField;
import org.jeecg.modules.userReports.entity.UserReportsRow;
import org.jeecg.modules.userReports.entity.UserReports;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Description: user_reports
 * @Author: jeecg-boot
 * @Date: 2023-02-25
 * @Version: V1.0
 */
public interface IUserReportsService extends IService<UserReports> {

    /**
     * 添加一对多
     *
     * @param userReports
     * @param userReportsFieldList
     * @param userReportsRowList
     */
    public void saveMain(UserReports userReports, List<UserReportsField> userReportsFieldList, List<UserReportsRow> userReportsRowList);

    /**
     * 修改一对多
     *
     * @param userReports
     * @param userReportsFieldList
     * @param userReportsRowList
     */
    public void updateMain(UserReports userReports, List<UserReportsField> userReportsFieldList, List<UserReportsRow> userReportsRowList);

    /**
     * 删除一对多
     *
     * @param id
     */
    public void delMain(String id);

    /**
     * 批量删除一对多
     *
     * @param idList
     */
    public void delBatchMain(Collection<? extends Serializable> idList);

    List<Map<String, Object>> getTableByCalcDate(String tableName, String calcDate);

    Page<Map<String, Object>> getTableQueryDate(String tableName, String slotNo, String beginDate, String endDate, int pageSize, int pageNo);

    int getTableTotal(String tableName, String slotNo, String beginDate, String endDate);

    int addTableRow(String tableName, Map<String, Object> map);

    int createTable(@Param("tableName") String tableName, @Param("cloums") List<String> cloums);

    List<String> getDateList(String tableName, String slotNo, String beginDate, String endDate);
}
